package com.bifang.module.file.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 应用读取文件权限表
 *
 * @author xyh
 * @since 2023-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("file_app_read")
@Schema(name = "FileAppRead", title = "应用读取文件权限表", description = "应用读取文件权限表实体类")
public class FileAppRead extends Model<FileAppRead> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "appReadId", title = "应用读取文件权限id")
    @TableId(value="APP_READ_ID", type = IdType.INPUT)
    private String appReadId;

    @Schema(name = "fileClassCode", title = "文件分类编号")
    @TableField(value = "FILE_CLASS_CODE")
    private String fileClassCode;

    @Schema(name = "appId", title = "应用id")
    @TableField(value = "APP_ID")
    private Long appId;


    @Schema(name = "expireTime", title = "过期时间，单位秒")
    @TableField(value = "EXPIRE_TIME")
    private Date expireTime;

    @Schema(name = "authStatus", title = "审核状态 0未审核，1审核通过，2审核不通过")
    @TableField(value = "AUTH_STATUS")
    private String authStatus;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "CREATE_NAME", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "UPDATE_NAME", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(title = "保密级别")
    @TableField("SECRECY_LEVEL")
    private String secrecyLevel;

    @Schema(title = "审核人")
    @TableField("AUDIT_NAME")
    private String auditName;

    @Schema(title = "审核意见")
    @TableField("AUDIT_OPINION")
    private String auditOpinion;

    @Schema(name = "auditTime", title = "审核时间")
    @TableField(value = "AUDIT_TIME")
    private Date auditTime;

    @Override
    public Serializable pkVal() {
        return this.appReadId;
    }
}
